//
//  LRXSettingCell.m
//  路人侠
//
//  Created by zhangxulong on 4/11/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "LRXSettingCell.h"
@interface LRXSettingCell()

@property (nonatomic,strong) UIImageView * iconImage;
@property (nonatomic,strong) UILabel * cellTitle;


@end

@implementation LRXSettingCell
- (UIImageView *)iconImage
{
    if (_iconImage == nil) {
        _iconImage = [[UIImageView alloc]init];
    }
    return _iconImage;
}
- (UILabel *)cellTitle{
    if (_cellTitle == nil) {
        _cellTitle = [[UILabel alloc]init];
    }
    return _cellTitle;
}
- (UIImageView *)cellAss
{
    if (_cellAss == nil) {
        _cellAss = [[UIImageView alloc]init];
    }
    return _cellAss;
}
- (void)setSelectBlock:(cellSelectBlock)selectBlock
{
    _selectBlock = [selectBlock copy];
}
- (void)layoutCellView:(NSString *)iconImageText withTitle:(NSString *)titleText withAss:(NSString * )assText
{
    self.iconImage.image = [UIImage imageNamed:iconImageText];
    self.cellTitle.text = titleText;
    self.cellAss.image = [UIImage imageNamed:assText];
    
    self.iconImage.frame = CGRectMake(42 * wScale, 20 * hScale, 40 * hScale, 40 * hScale);
    self.cellTitle.frame = CGRectMake(110 * wScale, 25 * hScale, 300 * wScale, 30 * hScale);
    self.cellTitle.font = [UIFont systemFontOfSize:28 * hScale];
    self.cellAss.frame = CGRectMake(550 * wScale, 20 * hScale, 40 * hScale, 40 * hScale);
    
    
    self.iconImage.center = CGPointMake(self.iconImage.center.x, self.center.y);
    self.cellTitle.center = CGPointMake(self.cellTitle.center.x, self.center.y);
    self.cellAss.center = CGPointMake(self.cellAss.center.x, self.center.y);
    
    [self addSubview:self.iconImage];
    [self addSubview:self.cellTitle];
    [self addSubview:self.cellAss];
}

@end
